<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>随机产生几个大写英文字母组合.</title>
</head>
<body>
<script type="text/javascript">
    // nGeSuiJiZiMu为产生几个的意思
    function suiji(nGeSuiJiZiMu) {
        let result=[];
        for(let i=1;i<=nGeSuiJiZiMu;i++){
            let strRandom=Math.ceil(Math.random()*25);
            result.push(String.fromCharCode(65+strRandom))
        }
        let s = result.join('');
        console.log("========suiji()==《"+s+"》===========")
        return s;
    }
    alert(suiji(4));
</script>
</body>
</html>